
<?php
  /*
    Copyright 2010 Persistent Systems Limited

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
   */

    /**
    * This code was generated by the tool 'PHPDataSvcUtil.php'.
    * Runtime Version:1.0
    *
    * Changes to this file may cause incorrect behavior and will be lost if
    * the code is regenerated.
    */

    require_once 'Context/ObjectContext.php';
    /**
    * Defines default OData Service URL for this proxy class
    */
    define("DEFAULT_ODATA_SERVICE_URL", "http://odata.netflix.com/Catalog.svc");
    
   /**
    * @class:TitleAudioFormat
    * @type:EntityType
    * @key:TitleId
    * @key:DeliveryFormat
    * @key:Language
    * @key:Format
    */
    class TitleAudioFormat extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $TitleId;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:10
        * @FixedLength:false
        */
        public $DeliveryFormat;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $Language;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $Format;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAudioFormat_Title
        * @FromRole:TitleAudioFormats
        * @ToRole:Titles
        */
        public $Title;
    

       /**
        * Function to create an instance of TitleAudioFormat
        * @param Edm.String $TitleId
        * @param Edm.String $DeliveryFormat
        * @param Edm.String $Language
        * @param Edm.String $Format
        */
        public static function CreateTitleAudioFormat(
            $TitleId, 
            $DeliveryFormat, 
            $Language, 
            $Format)
        {   
            $TitleAudioFormat = new TitleAudioFormat();
            $TitleAudioFormat->TitleId = $TitleId;
            $TitleAudioFormat->DeliveryFormat = $DeliveryFormat;
            $TitleAudioFormat->Language = $Language;
            $TitleAudioFormat->Format = $Format;
            return $TitleAudioFormat;
        }

       /**
        * Constructor for TitleAudioFormat
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Title'] = 'Titles';
            $this->_entityKey[] = 'TitleId';
            $this->_entityKey[] = 'DeliveryFormat';
            $this->_entityKey[] = 'Language';
            $this->_entityKey[] = 'Format';
            $this->Title = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:TitleAward
    * @type:EntityType
    * @key:Id
    */
    class TitleAward extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Guid
        */
        public $Id;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $Type;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:60
        * @FixedLength:false
        */
        public $Category;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Int32
        */
        public $Year;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Boolean
        */
        public $Won;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAward_Title
        * @FromRole:TitleAwards
        * @ToRole:Titles
        */
        public $Title;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAward_Person
        * @FromRole:TitleAwards
        * @ToRole:People
        */
        public $Person;
    

       /**
        * Function to create an instance of TitleAward
        * @param Edm.Guid $Id
        * @param Edm.String $Type
        * @param Edm.String $Category
        * @param Edm.Boolean $Won
        */
        public static function CreateTitleAward(
            $Id, 
            $Type, 
            $Category, 
            $Won)
        {   
            $TitleAward = new TitleAward();
            $TitleAward->Id = $Id;
            $TitleAward->Type = $Type;
            $TitleAward->Category = $Category;
            $TitleAward->Won = $Won;
            return $TitleAward;
        }

       /**
        * Constructor for TitleAward
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Title'] = 'Titles';
            $this->_entityMap['Person'] = 'People';
            $this->_entityKey[] = 'Id';
            $this->Title = array();
            $this->Person = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:Title
    * @type:EntityType
    * @key:Id
    */
    class Title extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $Id;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:Max
        * @FixedLength:false
        * @FC_TargetPath:SyndicationSummary
        * @FC_ContentKind:html
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:
        */
        public $Synopsis;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Int32
        */
        public $Runtime;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Double
        */
        public $AverageRating;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Int32
        */
        public $ReleaseYear;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:200
        * @FixedLength:false
        */
        public $Url;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.DateTime
        * @FC_TargetPath:SyndicationPublished
        * @FC_ContentKind:
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:false
        */
        public $DateModified;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:10
        * @FixedLength:false
        */
        public $Rating;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:8
        * @FixedLength:false
        */
        public $Type;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:NetflixModel.BoxArt
        */
        public $BoxArt;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:200
        * @FixedLength:false
        */
        public $ShortName;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:200
        * @FixedLength:false
        * @FC_TargetPath:SyndicationTitle
        * @FC_ContentKind:
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:
        */
        public $Name;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:NetflixModel.InstantAvailability
        */
        public $Instant;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:NetflixModel.DeliveryFormatAvailability
        */
        public $Dvd;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:NetflixModel.DeliveryFormatAvailability
        */
        public $BluRay;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:
        */
        public $TinyUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:200
        * @FixedLength:
        */
        public $WebsiteUrl;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:200
        * @FixedLength:
        */
        public $NetflixApiId;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAudioFormat_Title
        * @FromRole:Titles
        * @ToRole:TitleAudioFormats
        */
        public $AudioFormats;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAward_Title
        * @FromRole:Titles
        * @ToRole:TitleAwards
        */
        public $Awards;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_Title_Disc
        * @FromRole:Titles1
        * @ToRole:Titles
        */
        public $Disc;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_Title_Movie
        * @FromRole:Titles1
        * @ToRole:Titles
        */
        public $Movie;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_Title_Season
        * @FromRole:Titles1
        * @ToRole:Titles
        */
        public $Season;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_Title_Series
        * @FromRole:Titles1
        * @ToRole:Titles
        */
        public $Series;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleScreenFormat_Title
        * @FromRole:Titles
        * @ToRole:TitleScreenFormats
        */
        public $ScreenFormats;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleActors
        * @FromRole:Titles
        * @ToRole:People
        */
        public $Cast;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleLanguages
        * @FromRole:Titles
        * @ToRole:Language
        */
        public $Languages;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleDirectors
        * @FromRole:Titles
        * @ToRole:People
        */
        public $Directors;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleGenres
        * @FromRole:Titles
        * @ToRole:Genres
        */
        public $Genres;
    

       /**
        * Function to create an instance of Title
        * @param Edm.String $Id
        * @param Edm.DateTime $DateModified
        * @param Edm.String $Type
        * @param NetflixModel.BoxArt $BoxArt
        * @param Edm.String $ShortName
        * @param Edm.String $Name
        * @param NetflixModel.InstantAvailability $Instant
        * @param NetflixModel.DeliveryFormatAvailability $Dvd
        * @param NetflixModel.DeliveryFormatAvailability $BluRay
        * @param Edm.String $TinyUrl
        * @param Edm.String $NetflixApiId
        */
        public static function CreateTitle(
            $Id, 
            $DateModified, 
            $Type, 
            $BoxArt, 
            $ShortName, 
            $Name, 
            $Instant, 
            $Dvd, 
            $BluRay, 
            $TinyUrl, 
            $NetflixApiId)
        {   
            $Title = new Title();
            $Title->Id = $Id;
            $Title->DateModified = $DateModified;
            $Title->Type = $Type;
            $Title->BoxArt = $BoxArt;
            $Title->ShortName = $ShortName;
            $Title->Name = $Name;
            $Title->Instant = $Instant;
            $Title->Dvd = $Dvd;
            $Title->BluRay = $BluRay;
            $Title->TinyUrl = $TinyUrl;
            $Title->NetflixApiId = $NetflixApiId;
            return $Title;
        }

       /**
        * Constructor for Title
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['AudioFormats'] = 'TitleAudioFormats';
            $this->_entityMap['Awards'] = 'TitleAwards';
            $this->_entityMap['Disc'] = 'Titles';
            $this->_entityMap['Movie'] = 'Titles';
            $this->_entityMap['Season'] = 'Titles';
            $this->_entityMap['Series'] = 'Titles';
            $this->_entityMap['ScreenFormats'] = 'TitleScreenFormats';
            $this->_entityMap['Cast'] = 'People';
            $this->_entityMap['Languages'] = 'Language';
            $this->_entityMap['Directors'] = 'People';
            $this->_entityMap['Genres'] = 'Genres';
            $this->_entityKey[] = 'Id';
            $this->AudioFormats = array();
            $this->Awards = array();
            $this->Disc = array();
            $this->Movie = array();
            $this->Season = array();
            $this->Series = array();
            $this->ScreenFormats = array();
            $this->Cast = array();
            $this->Languages = array();
            $this->Directors = array();
            $this->Genres = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:TitleScreenFormat
    * @type:EntityType
    * @key:TitleId
    * @key:DeliveryFormat
    * @key:Format
    */
    class TitleScreenFormat extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $TitleId;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:10
        * @FixedLength:false
        */
        public $DeliveryFormat;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:30
        * @FixedLength:false
        */
        public $Format;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleScreenFormat_Title
        * @FromRole:TitleScreenFormats
        * @ToRole:Titles
        */
        public $Title;
    

       /**
        * Function to create an instance of TitleScreenFormat
        * @param Edm.String $TitleId
        * @param Edm.String $DeliveryFormat
        * @param Edm.String $Format
        */
        public static function CreateTitleScreenFormat(
            $TitleId, 
            $DeliveryFormat, 
            $Format)
        {   
            $TitleScreenFormat = new TitleScreenFormat();
            $TitleScreenFormat->TitleId = $TitleId;
            $TitleScreenFormat->DeliveryFormat = $DeliveryFormat;
            $TitleScreenFormat->Format = $Format;
            return $TitleScreenFormat;
        }

       /**
        * Constructor for TitleScreenFormat
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Title'] = 'Titles';
            $this->_entityKey[] = 'TitleId';
            $this->_entityKey[] = 'DeliveryFormat';
            $this->_entityKey[] = 'Format';
            $this->Title = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:Genre
    * @type:EntityType
    * @key:Name
    */
    class Genre extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:50
        * @FixedLength:false
        * @FC_TargetPath:SyndicationTitle
        * @FC_ContentKind:
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:
        */
        public $Name;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleGenres
        * @FromRole:Genres
        * @ToRole:Titles
        */
        public $Titles;
    

       /**
        * Function to create an instance of Genre
        * @param Edm.String $Name
        */
        public static function CreateGenre(
            $Name)
        {   
            $Genre = new Genre();
            $Genre->Name = $Name;
            return $Genre;
        }

       /**
        * Constructor for Genre
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Titles'] = 'Titles';
            $this->_entityKey[] = 'Name';
            $this->Titles = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:Language
    * @type:EntityType
    * @key:Name
    */
    class Language extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        * @FC_TargetPath:SyndicationTitle
        * @FC_ContentKind:
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:
        */
        public $Name;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleLanguages
        * @FromRole:Language
        * @ToRole:Titles
        */
        public $Titles;
    

       /**
        * Function to create an instance of Language
        * @param Edm.String $Name
        */
        public static function CreateLanguage(
            $Name)
        {   
            $Language = new Language();
            $Language->Name = $Name;
            return $Language;
        }

       /**
        * Constructor for Language
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Titles'] = 'Titles';
            $this->_entityKey[] = 'Name';
            $this->Titles = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:Person
    * @type:EntityType
    * @key:Id
    */
    class Person extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int32
        */
        public $Id;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        * @FC_TargetPath:SyndicationTitle
        * @FC_ContentKind:
        * @FC_NsPrefix:
        * @FC_NsUri:
        * @FC_KeepInContent:
        */
        public $Name;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:FK_TitleAward_Person
        * @FromRole:People
        * @ToRole:TitleAwards
        */
        public $Awards;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleActors
        * @FromRole:People
        * @ToRole:Titles
        */
        public $TitlesActedIn;
    
       /**
        * @Type:NavigationProperty
        * @Relationship:TitleDirectors
        * @FromRole:People
        * @ToRole:Titles
        */
        public $TitlesDirected;
    

       /**
        * Function to create an instance of Person
        * @param Edm.Int32 $Id
        * @param Edm.String $Name
        */
        public static function CreatePerson(
            $Id, 
            $Name)
        {   
            $Person = new Person();
            $Person->Id = $Id;
            $Person->Name = $Name;
            return $Person;
        }

       /**
        * Constructor for Person
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityMap['Awards'] = 'TitleAwards';
            $this->_entityMap['TitlesActedIn'] = 'Titles';
            $this->_entityMap['TitlesDirected'] = 'Titles';
            $this->_entityKey[] = 'Id';
            $this->Awards = array();
            $this->TitlesActedIn = array();
            $this->TitlesDirected = array();
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
    /**
    * @class:BoxArt
    * @type:ComplexType
    */
    class BoxArt
    {
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        */
        public $SmallUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        */
        public $MediumUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        */
        public $LargeUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:80
        * @FixedLength:false
        */
        public $HighDefinitionUrl;
    
    }
  
    /**
    * @class:InstantAvailability
    * @type:ComplexType
    */
    class InstantAvailability
    {
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Boolean
        */
        public $Available;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.DateTime
        */
        public $AvailableFrom;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.DateTime
        */
        public $AvailableTo;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Boolean
        */
        public $HighDefinitionAvailable;
    
    }
  
    /**
    * @class:DeliveryFormatAvailability
    * @type:ComplexType
    */
    class DeliveryFormatAvailability
    {
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Boolean
        */
        public $Available;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.DateTime
        */
        public $AvailableFrom;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.DateTime
        */
        public $AvailableTo;
    
    }
  
   /**
    * Container class NetflixCatalog, Namespace: NetflixModel
    */
    class NetflixCatalog extends ObjectContext
    {
    
        protected $_TitleAudioFormats;
        protected $_TitleAwards;
        protected $_Titles;
        protected $_TitleScreenFormats;
        protected $_Genres;
        protected $_Languages;
        protected $_People;
        
       /**
        * The constructor for NetflixCatalog accepting service URI
        */
        public function __construct($uri = "")
        {
            if(strlen($uri) == 0)
            {
                $uri = DEFAULT_ODATA_SERVICE_URL;
            }

            if (Utility::reverseFind($uri, '/') != strlen($uri) - 1)
            {
                $uri = $uri . '/';
            }

            $this->_baseURI = $uri;
            parent::__construct($this->_baseURI);
            $this->_entities = array(
                                "TitleAudioFormats",
                                "TitleAwards",
                                "Titles",
                                "TitleScreenFormats",
                                "Genres",
                                "Languages",
                                "People");
            $this->_entitySet2Type = array(
                                            "titleaudioformats" => "TitleAudioFormat", 
                                            "titleawards" => "TitleAward", 
                                            "titles" => "Title", 
                                            "titlescreenformats" => "TitleScreenFormat", 
                                            "genres" => "Genre", 
                                            "languages" => "Language", 
                                            "people" => "Person");
            $this->_entityType2Set = array(
                                            "titleaudioformat" => "TitleAudioFormats", 
                                            "titleaward" => "TitleAwards", 
                                            "title" => "Titles", 
                                            "titlescreenformat" => "TitleScreenFormats", 
                                            "genre" => "Genres", 
                                            "language" => "Languages", 
                                            "person" => "People");

            $this->_association = array(
                                         "FK_TitleAudioFormat_Title" => array(
                                                                         "Titles" => "1" ,
                                                                         "TitleAudioFormats" => "*" ), 
                                         "FK_TitleAward_Title" => array(
                                                                         "Titles" => "1" ,
                                                                         "TitleAwards" => "*" ), 
                                         "FK_TitleAward_Person" => array(
                                                                         "People" => "0..1" ,
                                                                         "TitleAwards" => "*" ), 
                                         "FK_Title_Disc" => array(
                                                                         "Titles" => "0..1" ,
                                                                         "Titles1" => "*" ), 
                                         "FK_Title_Movie" => array(
                                                                         "Titles" => "0..1" ,
                                                                         "Titles1" => "*" ), 
                                         "FK_Title_Season" => array(
                                                                         "Titles" => "0..1" ,
                                                                         "Titles1" => "*" ), 
                                         "FK_Title_Series" => array(
                                                                         "Titles" => "0..1" ,
                                                                         "Titles1" => "*" ), 
                                         "FK_TitleScreenFormat_Title" => array(
                                                                         "Titles" => "1" ,
                                                                         "TitleScreenFormats" => "*" ), 
                                         "TitleActors" => array(
                                                                         "Titles" => "*" ,
                                                                         "People" => "*" ), 
                                         "TitleLanguages" => array(
                                                                         "Titles" => "*" ,
                                                                         "Language" => "*" ), 
                                         "TitleDirectors" => array(
                                                                         "Titles" => "*" ,
                                                                         "People" => "*" ), 
                                         "TitleGenres" => array(
                                                                         "Titles" => "*" ,
                                                                         "Genres" => "*" ));

    
            $this->_TitleAudioFormats = new DataServiceQuery('/'.'TitleAudioFormats', $this);
            $this->_TitleAwards = new DataServiceQuery('/'.'TitleAwards', $this);
            $this->_Titles = new DataServiceQuery('/'.'Titles', $this);
            $this->_TitleScreenFormats = new DataServiceQuery('/'.'TitleScreenFormats', $this);
            $this->_Genres = new DataServiceQuery('/'.'Genres', $this);
            $this->_Languages = new DataServiceQuery('/'.'Languages', $this);
            $this->_People = new DataServiceQuery('/'.'People', $this);

        }

    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset TitleAudioFormats
         * @return DataServiceQuery
         */
        public function TitleAudioFormats()
        {
            $this->_TitleAudioFormats->ClearAllOptions();
            return $this->_TitleAudioFormats;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset TitleAwards
         * @return DataServiceQuery
         */
        public function TitleAwards()
        {
            $this->_TitleAwards->ClearAllOptions();
            return $this->_TitleAwards;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset Titles
         * @return DataServiceQuery
         */
        public function Titles()
        {
            $this->_Titles->ClearAllOptions();
            return $this->_Titles;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset TitleScreenFormats
         * @return DataServiceQuery
         */
        public function TitleScreenFormats()
        {
            $this->_TitleScreenFormats->ClearAllOptions();
            return $this->_TitleScreenFormats;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset Genres
         * @return DataServiceQuery
         */
        public function Genres()
        {
            $this->_Genres->ClearAllOptions();
            return $this->_Genres;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset Languages
         * @return DataServiceQuery
         */
        public function Languages()
        {
            $this->_Languages->ClearAllOptions();
            return $this->_Languages;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset People
         * @return DataServiceQuery
         */
        public function People()
        {
            $this->_People->ClearAllOptions();
            return $this->_People;
        }
    
       /**
        * Functions for adding object to the entityset/collection
        */
    
       /**
        * Add TitleAudioFormats
        * @param TitleAudioFormats $object
        */
      public function AddToTitleAudioFormats($object)
        {
            return parent::AddObject('TitleAudioFormats', $object);
        }
    
       /**
        * Add TitleAwards
        * @param TitleAwards $object
        */
      public function AddToTitleAwards($object)
        {
            return parent::AddObject('TitleAwards', $object);
        }
    
       /**
        * Add Titles
        * @param Titles $object
        */
      public function AddToTitles($object)
        {
            return parent::AddObject('Titles', $object);
        }
    
       /**
        * Add TitleScreenFormats
        * @param TitleScreenFormats $object
        */
      public function AddToTitleScreenFormats($object)
        {
            return parent::AddObject('TitleScreenFormats', $object);
        }
    
       /**
        * Add Genres
        * @param Genres $object
        */
      public function AddToGenres($object)
        {
            return parent::AddObject('Genres', $object);
        }
    
       /**
        * Add Languages
        * @param Languages $object
        */
      public function AddToLanguages($object)
        {
            return parent::AddObject('Languages', $object);
        }
    
       /**
        * Add People
        * @param People $object
        */
      public function AddToPeople($object)
        {
            return parent::AddObject('People', $object);
        }
    

       /**
        * This function returns the entities.
        */
        public function getEntities()
        {
            return $this->_entities;
        }
    }
  
?>
  